package com.cnxdc.demo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Category {
    @NotNull(groups = Category.Update.class)
    private int id;
    @NotEmpty(groups = {Category.Add.class,Category.Update.class})
    private String categoryName;//驼峰命名
    @NotEmpty
    @NotEmpty(groups = {Category.Add.class,Category.Update.class})
    private String categoryAlias;//别名

    private int createUser;//创建者
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    public interface Add{

    }
    public interface Update{

    }
}
